package com.youkeda.yikao.web.control;

import com.youkeda.yikao.web.config.NeedLogin;
import com.youkeda.yikao.web.dataobject.ZhangyankunSpringUser;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

/**
 * @author ：xiong
 * @date ：Created in 2019/9/1 15:33
 * @description：
 * @modified By：
 */
@Controller
public class FoosControl {
    @RequestMapping(path = "/foos")
    @ResponseBody
    @NeedLogin
    public String getFoos(HttpSession session){
        ZhangyankunSpringUser user= (ZhangyankunSpringUser) session.getAttribute("user");
        return user.getPsd()+":"+user.getName();
    }
}
